package com.zhouheng.springbootdesignpattern.proxypattern.staticproxy;

/**
 * 静态代理类
 *
 * @author 周恒
 * @date 20190610 16:59:37
 * @since v1.0
 */
public class UserDaoProxy implements IUserDao {

    private IUserDao target;

    public UserDaoProxy(IUserDao target){
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("开始事务...");
        target.save();
        System.out.println("提交事务...");
    }

}
